#include "StdAfx.h"
#include "GlobalUtil.h"



RECT GetPosInParent(CWnd* pParentWnd,CWnd* pChildWnd)
{
	ASSERT_VALID(pParentWnd);
	ASSERT_VALID(pChildWnd);

	RECT rect;
	::GetWindowRect(pChildWnd->m_hWnd,&rect);
	::ScreenToClient(pParentWnd->m_hWnd,(LPPOINT)&rect);
	::ScreenToClient(pParentWnd->m_hWnd,(LPPOINT)&rect + 1);

	return rect;
}
